<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%-- 
    Document   : StartContent
    Created on : Jul 19, 2011, 10:55:21 AM
    Author     : HOANG ANH
--%>

<%@tag description="put the tag description here" pageEncoding="UTF-8"%>

<%-- The list of normal or fragment attributes can be specified here: --%>
<%@attribute name="level" required="true" type="java.lang.Integer"%>

<%-- any content can be specified here e.g.: --%>
<%
    String path = "";
    for (int i = 0; i < level; i++) {
        path += "../";
    }
%>
<table width="100%">
    <tr>
        <td valign="top" width="190px">
            <table>
                <tr>
                    <td width="185px" style="border-right-width: thin; border-right-style: solid; height: 125px;">
                        
                        <c:choose>
                            <c:when test= '<%= request.isUserInRole("Admin")%>' >
                                Welcome, <%= request.getRemoteUser()%> <br/>
                                <a href="<%=path%>Admin/AdminPage.jsp">Admin Page</a><br/>
                                <a href="<%=path%>LogOut.jsp">LogOut</a>
                            </c:when>
                            <c:when test='<%= request.isUserInRole("User")%>'>
                                Welcome, <%= request.getRemoteUser()%> <br/>
                                <a href="<%=path%>LogOut.jsp">LogOut</a>
                            </c:when>
                            <c:otherwise>
                                <a href="<%=path%>User/LoginGate.jsp">LogIn</a>
                            </c:otherwise>
                        </c:choose>                        
                    </td>
                </tr>
                <tr>
                    <td width="185px" style="border-right-width: thin; border-right-style: solid;">
                        <a href="<%=path%>index.jsp">Home</a>
                        <br />
                        <a href="<%=path%>ViewCart.jsp">Your Cart</a>
                    </td>
                </tr>
                <tr>
                    <td width="185px">
                        &nbsp;
                    </td>
                </tr>
            </table>
        </td>
        <td valign="top">